home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Format 1994 October
/
Macformat17.cdr
/
Shareware City
/
Developers
/
MacAppMods1.0d3
/
Read Me First
next >
Wrap
Text File
|
1994-06-25
|
11KB
|
162 lines
CodeWarrior DR3 and MacApp 3.1 final “Care Package” 1.0d3
Using CodeWarrior to build MacApp 3.1 final
1.0d3 6/25/94 changes for this version are marked with @@@
fixed bad cut and paste typo in MODs (marked with @@@)
noted that later versions than 6-13-94 fixed the bug mentioned in MacAppHeaders.h
moved the wantDebugging to MacAppHeaders.h where it is handier
changed #ifdef __MWERKS__ to #if __MWERKS__ && qDebug for the AppleEvent hack
1.0d2 6/24/94 changes for this version are marked with •••
added prebuilt projects for MacApp libraries and DemoDialogs with all settings
(projects are for DR3 compiler)
added Runtime.o.lib (the same as on DR3 but added for completeness)
added qPerform define (can't use it with CW though) in MacAppHeaders.cp
added MacAppHeaders.h to show how to add your own compile time flags
additional mods to force drawing of the Debug menu, fix PascalString.h to be
more ARM compliant, and fix a bug in UMenuMgr.cp with System 7.5
changed Full Macsbug names to None (for smaller app size)
1.0d1 6/12/94 first version
Enclosures:
DemoDialogs68K.π.SEG, MODs, NubDispatchGlue.o.lib, Unmangle.o.lib, MacAppHeaders.cp, UMemory.cp,
UMemory.h and DisAsmLookup.h
•••MacAppHeaders.h, and projects for PPC and 68K builds
Both CodeWarrior and MacApp 3.1 were going Golden Master about the same time. Consequently the
various Release Notes on the two products aren’t quite up-to-date. This document will attempt
to do three things:
1. Give you a step by step procedure to set up MacApp 3.1 and CW.
2. Show how to use MABuildRSRC with ToolServer or MPW. (Still Not Done.)
3. Show you some changes you can make to your MacApp Libraries to give you more functionality.
1. The step by step instructions…
68K (For a debug version see item 3 below.)
These are the instructions for a nodebug version of MacApp 3.1 final. Take the folder
CodeWarrior Tools ƒ:MacApp 3.1 Projects:MacApp Headers ƒ and put that folder inside the
Metrowerks C/C++ ƒ. Go back to CodeWarrior Tools ƒ:MacApp 3.1 Projects:68K:DemoDialogs68K:
and open DemoDialogs68K.π. When you open the project, it will tell you that it can’t find an
access path. Click on Preferences and move to the Access Paths icon. Select the path and
click Change. Move to your MacApp folder and select it. Remove the ANSI (2i) C.68K.Lib
library and replace it with the ANSI (4i) C.68K.Lib that you downloaded from our ftp site.
(The ANSI (4i) C.68K.Lib on the CD is broken.) Open the file MacAppHeaders.cp (found in the
MacApp Headers ƒ) and precompile naming it MacAppHeaders68K++. Be sure to check the
isHighLevelEventAware and LocalAndRemoteHLEvents flags in the SIZE pop-up menu (in the
project pane). Put the file DemoDialogs68K.π.SEG in the project folder. (This file was
originally created for MacApp 3.1ß1. It maps segment names and instructs the compiler to
combine various segments together. Using this file will greatly reduce the number of segments
in your app. The compiler searches for a file with the project name plus .SEG so feel free to
rename it for your projects. Be aware that it was written for an earlier version of MacApp and
it might not work as well if different segments are renamed.) Build DemoDialogs68K. I have
noticed that the preferences occasionally don’t seem to “stick”. If they migrate to the factory
settings select the following:
Language: Activate C++ Compiler and use MacAppHeaders68K++ for the prefix file
Warnings: none
Processor: Large code model, 68K struct alignment, 68020, 4 byte ints, Peephole Optimizer, CSE
Optimizer, Optimize For Size, Far Virtual Function Tables, and Far String Constants
Linker: •••"None" Macsbug Names, Generate SYM File, Full Path in Sym Files, Generate Link Map,
Generate A6 Stack Frames, The Debugger™ Aware, and Fast Link
Project: DemoDialogs68K, SS11 (for creator), minimum 1500, prefered 1500,
acceptSuspendResumeEvents, canBackground, doesActivateOnFGSwitch, is32BitCompatible,
isHighLevelEventAware and LocalAndRemoteHLEvents SIZE flags
Access Paths: The MacApp folder
•••PPC (For a debug version see item 3 below.)
These are the instructions for a nodebug version of MacApp 3.1 final. Take the folder
CodeWarrior Tools ƒ:MacApp 3.1 Projects:MacApp Headers ƒ and put that folder inside the
Metrowerks C/C++ ƒ. Go back to CodeWarrior Tools ƒ:MacApp 3.1 Projects:PPC:DemoDialogsPPC:
and open DemoDialogsPPC.π. When you open the project, it will tell you that it can’t find an
access path. Click on Preferences and move to the Access Paths icon. Select the path and
click Change. Move to your MacApp folder and select it. Open the file MacAppHeaders.cp
(found in the MacApp Headers ƒ) and precompile naming it MacAppHeadersPPC++. Be sure to check
the isHighLevelEventAware and LocalAndRemoteHLEvents flags in the SIZE pop-up menu (in the
project pane). Build DemoDialogsPPC. I have noticed that the preferences occasionally
don’t seem to “stick”. If they migrate to the factory settings select the following:
Language: Activate C++ Compiler and use MacAppHeadersPPC++ for the prefix file
Warnings: none
Processor: 68K struct alignment, Optimize for Speed and select all 3 boxes
Linker: Generate SYM File, Full Path in Sym Files, Generate Link Map, Faster Linking, and
the default Entry Points of __initialize, __start, and __terminate.
PEF: "None" Export Symbols and everything else either 0 or unchecked
Project: DemoDialogsPPC, SS11 (for creator), minimum 1536, prefered 1536, stack 128
acceptSuspendResumeEvents, canBackground, doesActivateOnFGSwitch, is32BitCompatible,
isHighLevelEventAware and LocalAndRemoteHLEvents SIZE flags
Access Paths: The MacApp folder
2. How to use MABuildRSRC…
Not completed yet. The resource files supplied with DR3 can be used with debug and nodebug
versions (or at least I do). Another alternative is to simply use the resource fork of an
MPW MacApp build of your app (without theCODE resources, of course). I will prepare a FAQ
about using MABuildRSRC with ToolServer ASAP.
3. Debug versions of MacApp…
I am able to to build MacApp 3.1 final with DR3 with the following flags: qDebug, qDebugMsg,
qInspector, qTheDebugger and of course qSyms and qNames. The changes here (except for my
changes to UFailure.cp) have been suggested by others, notably Cory Kempf, Jeroen Schalk and
Frederick Sigal although none of them in any way endorse my combination of mods. I hope that
if anyone sees a better way to do this, they will contact me so I can update this document.
68K:
•••Projects are included for building DemoDialogs68K, a MacApp library, and a DemoDialogs68K
version that uses the MacApp library
•••Use the .rsrc files (changing the name if you are using the library including version) from
the CodeWarrior Tools ƒ:MacApp 3.1 Projects:68K:DemoDialogs68K: folder.
•••Replace the MacApp Headers ƒ you put in the compiler folder with the same named folder found
in the folder you got this doc. Open the DemoDialogs68K.π and changed the access path to
point to your MacApp folder.
From the MODs file:
•••Two changes must be made to UMenuMgr.cp.
•••One change must be made to PascalString.h to make the code more ARM compliant (changing the
friend Boolean operators to a friend inline Boolean operator; be careful that you only change
the ones I've included.) Two other changes are necessary if you are using the 6-13-94 MPTP
version (only distributed to our beta sites);
@@@later versions of the compiler have fixed the bug.
You use the MacAppHeaders.h file to switch changes on or off.
@@@You can also use MacAppHeaders.h to set wantDebugging so that qDebug, qDebugMsg, qTheDebugger,
etc. can be set with one switch.
Change UObject.h to the new version. (The change only affects the declaration of TObject and
allows Jasik’s debugger to display the class tree.)
Replace UMemory.h and UMemory.cp entirely. (This is supposed to be a better method of memory
management which doesn’t conflict with CW’s segment loading. I haven’t tested to see if that
is true, but it was recommended to me and I don’t have problems with it.)
Make the 4 changes to UDebug.cp and the 1 change to UDebug.h. You’ll also need to add
NubDispatchGlue.o.lib, Unmangle.o.lib and put DisAsmLookup.h in the MacApp directory.
Add the last bit of code above the function Assertion(). With qDebug set, MacApp calls
fprintfs to output to your debugger. Unfortunately this is done with _addDevHandler which
CW doesn’t support. Instead the fprintfs get sent to CW’s SIOUX window which unfortunately
wants to put up it’s own menus. I’ve written a hack which sends the output to the Scriptable
Text Editor via AppleEvents. Add AEObjectSupportLib.o.lib to your project. IMPORTANT You
must have a Scriptable Text Editor window open. So far I haven’t written the code to bring up
a window if it doesn’t already exist. Other limitations: If you select the
data in the Scriptable Text Editor window and delete it while DemoDialogs is running, you don’t
get additional messages.
I consider the AppleEvent hack a temporary mod until CW supports a menu-less SIOUX window (we
are working on it as I write this) and/or support _addDevHandler.
@@@Re-precompile MacAppHeader.cp and call it whatever you want to put in the include statement,
e.g. MacAppHeaders68K_DR3; remove all binaries and re-build.
PPC:
•••Projects are included for building DemoDialogsPPC, a MacApp library, and DemoDialogsPPC
version that uses the MacApp library
•••Use the .rsrc files (changing the name if you are using the library including version) from
the CodeWarrior Tools ƒ:MacApp 3.1 Projects:PPC:DemoDialogsPPC: folder.
Do all of the above 68K stuff, except don’t add any of the libraries. Instead only add
ObjectSupport.lib. Use PPC in project names instead of 68K. The ANSI library on the CD is OK.
If you discover other bugs or have other suggestions, I will try to keep this “Care Package”
up-to-date at the usual internet sites: AOL, AppleLink:CodeWarrior Discussion and our ftp site
at acura.gslis.utexas.edu. Please send comments to AL: MARKANDERSON or (preferably)
marka4@metrowerks.ca. My goal is to provide the necessary mods so that CW builds of MacApp
suffer little or no loss of the functionality that users have grown to expect with MPW builds.
Future plans: Give instructions for MABuildRSRC, look into segment loading and
write a CW version of _addDevHandler.
Thank you,
Mark Anderson
metrowerks